package com.rainng.coursesystem.manager;

import com.rainng.coursesystem.model.CourseNotificationItem;
import com.rainng.coursesystem.service.CourseNotificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CourseNotificationManager {

    @Autowired
    private CourseNotificationService courseNotificationService;

    public List<CourseNotificationItem> getNotificationsByCourseId(Long courseId) {
        return courseNotificationService.getNotificationsByCourseId(courseId);
    }

    public CourseNotificationItem createNotification(CourseNotificationItem notification) {
        // 可以在这里添加额外的业务逻辑，比如验证或权限检查
        return courseNotificationService.createNotification(notification);
    }

    public boolean deleteNotification(Long id) {
        // 可以在这里添加额外的业务逻辑，比如检查是否存在后再删除
        return courseNotificationService.deleteNotification(id);
    }

    // 可以根据需要添加更多方法
}